package org.jeecg.modules.htxincailiao.cart.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.htxincailiao.cart.entity.HTCart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: ht_cart
 * @Author: jeecg-boot
 * @Date:   2021-06-07
 * @Version: V1.0
 */
public interface HTCartMapper extends BaseMapper<HTCart> {

    @Select("<script>" +"SELECT * FROM ht_cart WHERE goods_id=#{goodsId}" + "</script>")
    HTCart getByGoodsId(@Param("goodsId") String goodsId);

    @Select("<script>" +"SELECT * FROM ht_cart WHERE library_id=#{libraryId}" + "</script>")
    HTCart getByLibraryId(@Param("libraryId") String libraryId);

    @Select("<script>" +"SELECT * FROM ht_cart WHERE report_id=#{reportId}" + "</script>")
    HTCart getByReportId(@Param("reportId") String reportId);
}
